<?
/**
* Copyright (c) 2002-2007 BioWare Corp.
* http://www.bigdaddymonitor.org
*
* This file is part of the BigDaddy Monitoring
* program. It is free software distributed under
* the terms of the BSD License. It is ditributed
* in the hopes that it will be useful, but
* WITHOUT ANY WARRANTY; without event the implied
* warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE.
*
* The BSD License is available from:
* http://www.opensource.org/licenses/bsd-license.php
**/
//Main Index Page

//Do not go through the theming
$pageParams["noDisplay"]=1;
?>
<html>
<head>
<title>BigDaddy Login</title>

<script language="javascript1.2">
<!--
function setLoginFocus()
{
	document.login_form.loginUsername.focus();
}
//-->
</script>


</head>
<body onload="setLoginFocus();">

<style>

a            {
	color: #3D3E74;
	text-decoration: underline;
	}

a:visited {
	color: #cc0066;
	}
a:hover      {
	color: red;
	text-decoration: underline;
	}
a:active {
	color: #D09448;
	}


b            {
	color: #000000;
	}

body         {
	background: #FFFFFF;
	margin-top: 3px;
	margin-bottom: 0px;
	margin-left: 0px;
	margin-right: 0px;
	color: #000000;
	}

em           {
	color: #000000;
	}

form         {
	margin-bottom: 4px;
	}
h2           {
	font-family : Verdana, arial, sans-serif;
	font-size : 13pt;
	color: #000000;
	}
h3           {
	font-family : Verdana, arial, sans-serif;
	font-size : 12pt;
	color: #000000;
	}
h4           {
	font-family : Verdana, arial, sans-serif;
	font-size : 10pt;
	color: #000000;
	}
hr           {
	height: 1px;
	/*color: #0000FF;*/
	}
i            {
	color: #000000;
	}
ol           {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 12px;
	color: #000000;
	 }
p            {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 12px;
	color: #000000;
	}
select       {
	font-size : 8pt;
 }
strong       {
	color: #000000;
	}
td           {
		font-family: Verdana, Arial, Helvetica, sans-serif;
		font-size: 12px;
		color: #000000;
}
ul           {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 12px;
	color: #000000;
 }

/* Form styles */

.whitebg {
	background: #ffffff;
}

.goldbg {
	background: #006699;
}

.lightgoldbg {
	background: #0099cc;
}

.smalltext {
	font-size: 8pt;
	text-decoration: none;
}


.highlight {
	color: red;
}

.bluebg {
	background:  #3D3E74;
}

.greybg {
	background:  #DDDDDD;
	color: #000000;
}

.greybg2 {
	background:  #BBBBBB;
	color: #000000;
}

.greybg3 {
	background:  #838383;
	color: #838383;
}

.title {
	font-size: 12pt;
}

.mainjump {
	width: 250px;
	background-color: #ffffff;
	border-width: 1px;
	border-style: solid;
	font-size: 9pt;
}

.input2 {
	width: 150px;
	background-color: #ffffff;
	border-width: 1px;
	border-style: solid;
	border-color: #0066cc;
	font-size: 9pt;
}

.input3 {
	width: 80px;
	background-color: #123B10;
    color: white;
	border-width: 2px;
	font-size: 9pt;
}


</style>

<table cellspacing="2" cellpadding="2" border="0" align="center">
<tr valign="top" valign="top">
<td width="225">
	<?
    
    
    
    
	?>
	<form name="login_form" action="<?=$_SERVER["PHP_SELF"];?>" method="post" autocomplete="off">
    <br>
    <br>
    <img src="/images/bigdaddy.jpg" border="0">
    <br>
    <?
       
    switch ($UserSession->nError)
    {
        case 1:
            echo '<p class="highlight"><span class="smalltext">Authentication error: LDAP - check password.</span></p>';
            break;
        case 2:
            echo '<p class="highlight"><span class="smalltext">Authentication error: LDAP - check username.</span></p>';
        
            break;
        case 3:
            echo '<p class="highlight"><span class="smalltext">Authentication error: MYSQL Auth - No User.</span></p>';
        
            break;
        case 4:
            echo '<p class="highlight"><span class="smalltext">Authentication error: MYSQL Auth - Password not set.</span></p>';
            break;
        case 5:
            echo '<p class="highlight"><span class="smalltext">Authentication error: MYSQL Auth - Password incorrect.</span></p>';
            break;
    }
       
    if (defined("MYSQL_AUTH_ONLY") && MYSQL_AUTH_ONLY == 1)
    {
        echo "<p>Use your <b>BigDaddy</b> username and password:</p>";
    }
    else
    {
        echo "<p>Use your <b>Windows</b> username and password:</p>";
    }
    ?>
    
    
	<table width="200" cellspacing="2" cellpadding="2" border="0" align="center">
	<tr valign="top">
	    <td nowrap>
		<p class="smalltext"><b>Username:</b></p>
		</td>
		<td>
		<input type="text" name="loginUsername" size="20" maxlength="40" class="input2" />
		</td>
	</tr>
	<tr valign="top">
	    <td nowrap>
		<p class="smalltext"><b>Password:</b></p>
		</td>
		<td>
		<input type="password" name="loginPassword" size="20" maxlength="45" class="input2" autocomplete="off"  />
		</td>
	</tr>

	<tr valign="top">
		<td colspan="2" align="center">
		<input type="hidden" value="1" name="proc" />
		<input type="hidden" value="<?=$_SERVER["HTTP_HOST"];?>" name="host" />
		<input type="hidden" value="<?=$_SERVER["PHP_SELF"];?>" name="page" />
		<input type="hidden" value="<?=$_SERVER["QUERY_STRING"];?>" name="query" />
		<input type="submit" value="Login" class="input3" />
		</td>
	</tr>

	

	</table>

	</form>
</td>
</tr>
</table>

</body>
</html>
